import {debounce} from "./utils";

export const iteImgLoadMixin = {
    data() {
      return {
          itemImgLoad: null,
          newRefresh : null
      }
    },
    mounted() {
        //监听图片加载
        this.newRefresh = debounce(this.$refs.scroll.refresh, 500);
        this.itemImgLoad = () => {
            this.newRefresh();
        };
        this.$bus.$on('imgLoad', this.itemImgLoad)
    }
}


import backTop from 'content/backTop/BackTop';
export const backTopMixin = {
    data() {
        return {
            display: false
        }
    },
    components: {
        backTop
    },
    methods: {
        backTop() {
            this.$refs.scroll.scrollTo(0, 0, 500);
        }
    }
};